package com.wen.controller;

import com.wen.pojo.Auth;
import com.wen.service.AuthService;
import com.wen.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/auth")
public class AuthController {
    @Autowired
    private AuthService authService;
    @RequestMapping("/auth-tree")
    public Result authTree(){
        List<Auth> authList = authService.allAuthTreeByUid();
        return Result.ok(200,"获取成功",authList);
    }
}
